Skip to main content

Available API's

The following API's are available, the base URL in all cases is:

https://<customer_account>.finansysapps.com/

View a transaction

Extracts the details of a transaction in JSON format.

ItemValues Required
URL (after base)api/entrymodule/<record_id>/detail
MethodGET
Parametersmoduleid: <module_id>
Headersx-api-key: <API Key>
Accept: */*
BodyNot required
Expected ResponseTransaction details in JSON format

Save a transaction

Creates a transaction in draft form.

ItemValues Required
URL (after base)api/entrymodule/save
MethodPOST
Parametersmoduleid: <module_id>
Headersx-api-key: <API Key>
Accept: */*
Content-Type: application/json
BodyTransaction details in JSON format
Expected Response{
"success": true,
"message": "The data has been added.",
"data": {
"recordId": "8ac22ffb80d547728c880779047bb2f7"
}
}

The response contains the record ID of the newly started transaction. This can then be used to submit the transaction. If it is not submitted it will remain in draft form.

tip

To ensure you format the JSON you send in the body correctly, you can extract the details of an existing transaction using the 'View' option above. The format required will be everything within the 'data' section including the curly brackets, but excluding the system fields as these values are generated when the transaction is created.

Submit a transaction

Submits a draft transaction.

ItemValues Required
URL (after base)api/entrymodule/submit
MethodPOST
Parametersmoduleid: <module_id>
recordid: <record_id>
Headersx-api-key: <API Key>
Accept: */*
Content-Type: application/json
BodyNot required
Expected Response{
"success": true,
"message": "Data has been submitted",
"data": {
"instance_id": "fdd4998b8ad44cdea046896af3573748"
}
}

The instance_id returned here indicates the stage that the transaction is now at. This is also known as the task_id and is required if you want to use the API to approve the transaction.

tip

Sending a transaction for authorisation is a two stage process. Firstly use the 'save' API to send the transaction details, then use the 'submit' API with the record ID that the 'save' call responded with to submit the transaction and send it on to the next step of the process.

Approve a transaction

Use this on any transaction awaiting approval to move it on to the next step in the process.

ItemValues Required
URL (after base)api/entrymodule/approve
MethodPOST
ParametersNone
Headersx-api-key: <API Key>
Accept: */*
Content-Type: application/json
Body{
"task_id":<task_id>
"accepted": true
}
Expected Response{
"success": true,
"message": "Data has been submitted",
"data": null{
"instance_id": "fdd4998b8ad44cdea046896af3573748"
}
}

Get Reference Data By Key

This allows you to get a specific reference data item by searching on the primary key field. The primary key field is always present, it can be entered by the user (but must be unique) or system generated.

ItemValues Required
URL (after base)api/referencedataentry/getdatabykey
MethodGET
Parametersreferencedataid: <reference_data_id>
key: <primary_key_value>
Headersx-api-key: <API Key>
Accept: */*
Content-Type: application/json
BodyNot required
Expected Response{
"success": true,
"message": "",
"data": {
"field1": "value1",
"field1": "value1"
...
}
}

Update Reference Data By Key

This allows you to update reference data in a 'create or amend' way based on the primary key. If a record with the supplied primary key exists then the record will be amended with the data supplied, if not a new record will be created. If the data is supplied without a key then a new one will be generated.

ItemValues Required
URL (after base)api/referencedataentry/keybatch
MethodPOST
Parametersreferencedataid: <reference_data_id>
key: <primary_key_value>
Headersx-api-key: <API Key>
Accept: */*
Content-Type: application/json
Body{
"field1":"value1",
"field2":"value2",
...
}
Expected Response{
"success": true,
"message": "Reference Data has been updated...",
"data": null
}

Reference Data Bulk Update

This allows you to update multiple reference data items in a single API call. As with the update by key method it works in a 'create or amend' way based on the primary key. If a record with the supplied primary key exists then the record will be amended with the data supplied, if not a new record will be created. If the data is supplied without a key then a new one will be generated.

ItemValues Required
URL (after base)api/referencedataentry/keybatches
MethodPOST
Parametersreferencedataid: <reference_data_id>
Headersx-api-key: <API Key>
Accept: */*
Content-Type: application/json
Body[
{"key":"value","field1","value1",...},
{"key":"value","field1":"value1",...}
...
]
Expected Response{
"success": true,
"message": null,
"data": null
}
tip

Note that the body values must be enclosed in square brackets

Reference Data Lookup

This will enable you to get a list of reference data for a specified reference data ID.

https://<customer_id>.finansysapps.com/referencedata/<reference_data_id>?from=datatable

ItemValues Required
URL (after base)api/referencedataentry/lookup
MethodPOST
ParametersNone
Headersx-api-key: <API Key>
Accept: */*
Content-Type: application/json
Body{
"referenceDataId": "<reference_data_id>",
"fieldName": [
"field1",
"field2"
...
]
}
Expected Response{
"recordsFiltered": 6,
"recordsTotal": 6,
"message": "",
"data": [
{
"field1": "value1",
"field2": "value2"
},}
}

In this example body 'field1', 'field2' etc. would be replaced by the actual field IDs you want to see. These would usually be the same as the field names but in lower case with spaces and special characters replaced with underscores, but you can check these by going in to the reference data designer and viewing the field properties.

Filters can be added to the reference data lookup to conditionally return only some of the values. The format is as follows:

&#123;
"referenceDataId": "&lt;reference_data_id>",
"fieldName": [
"value1",
"value2"
]
,
"filter":&#123;
"matchesAll":true,
"filters": [
&#123;
"field":"value1",
"operator":"eq",
"value":"filter_value1",
"ignoreCase": true
},
&#123;
"field":"value2",
"operator":"eq",
"value":"filter_value2",
"ignoreCase": true
}
...
]

}
}
  • matchesAll - true for all filters must match (AND condition), false for any condition must match (OR condition)

  • operator - valid values are:

    • eq - equal to
    • neq - not equal to
    • lt - less than
    • gt - greater than
    • lte - less than or equal to
    • gte - greater than or equal to
    • contains - filter value is contained in field
    • startswith - value begins with filter value

Reference data delete

Deletes one or more rows from a reference data table.

ItemValues Required
URL (after base)api/referencedataentry/deleterow
MethodPOST
Parametersreferencedataid: <reference_data_id>
Headersx-api-key: <API Key>
Accept: */*
Content-Type: application/json
Body["<reference_data_id","reference_data_line_id"...>]
Expected Response{
"success": true,
"message": null,
"data": null
}